﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace MSRoomLocator.ViewModels
{
    public class RoomViewModel : INotifyPropertyChanged
    {
        private string _id;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public string ID
        {
            get
            {
                return _id;
            }
            set
            {
                if (value != _id)
                {
                    _id = value;
                    NotifyPropertyChanged("ID");
                }
            }
        }

        private string _name;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                if (value != _name)
                {
                    _name = value;
                    NotifyPropertyChanged("Name");
                }
            }
        }

        private string _building;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public string Building
        {
            get
            {
                return _building;
            }
            set
            {
                if (value != _building)
                {
                    _building = value;
                    NotifyPropertyChanged("Building");
                }
            }
        }

        private string _floorPlan;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public string FloorPlan
        {
            get
            {
                return _floorPlan;
            }
            set
            {
                if (value != _floorPlan)
                {
                    _floorPlan = value;
                    NotifyPropertyChanged("FloorPlan");
                }
            }
        }

        private int _floor;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public int Floor
        {
            get
            {
                return _floor;
            }
            set
            {
                if (value != _floor)
                {
                    _floor = value;
                    NotifyPropertyChanged("Floor");
                }
            }
        }

        private double _offsetX;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public double OffsetX
        {
            get
            {
                return _offsetX;
            }
            set
            {
                if (value != _offsetX)
                {
                    _offsetX = value;
                    NotifyPropertyChanged("OffsetX");
                }
            }
        }

        private double _offsetY;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public double OffsetY
        {
            get
            {
                return _offsetY;
            }
            set
            {
                if (value != _offsetY)
                {
                    _offsetY = value;
                    NotifyPropertyChanged("OffsetY");
                }
            }
        }

        private int _floorPlanID;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public int FloorPlanID
        {
            get
            {
                return _floorPlanID;
            }
            set
            {
                if (value != _floorPlanID)
                {
                    _floorPlanID = value;
                    NotifyPropertyChanged("FloorPlanID");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
